package com.example.demo.entity.goods;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
@TableName("`to_goods_info`")
public class GoodsInfo {
    @TableId(type = IdType.AUTO)
    private Long id;
    private Long code;
    @TableField("`name`")
    private String name;
    private String Description;
    private String price;
    private String weight;
    private String material;

    private Long isDelete;
    private Long createTime;
    private Long createUser;
    private Long updateTime;
    private Long updateUser;

    public void initEntity() {
        this.id = 0l;
        this.isDelete = 0l;
    }
}
